/**************************************************************************************** 
 Copyright © 2003-2012 hbasesoft Corporation. All rights reserved. Reproduction or       <br>
 transmission in whole or in part, in any form or by any means, electronic, mechanical <br>
 or otherwise, is prohibited without the prior written consent of the copyright owner. <br>
 ****************************************************************************************/
package com.hbasesoft.hamibot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * <Description> <br>
 * 
 * @author 王伟<br>
 * @version 1.0<br>
 * @taskId <br>
 * @CreateDate 2021年4月27日 <br>
 * @since V1.0<br>
 * @see com.hbasesoft.cloud.common.ui <br>
 */
@Configuration
public class MainPagerConfig implements WebMvcConfigurer {

    /**
     * @Method addViewControllers
     * @param registry
     * @Author 李煜龙
     * @Description TODD
     * @Date 2023/3/10 14:08
     */
    @Override
    public void addViewControllers(final ViewControllerRegistry registry) {
        String path = "redirect:/task-app";
        registry.addViewController("/").setViewName(path);
        registry.addViewController("").setViewName(path);
        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
    }
}
